package com.googlecode.afx.view.behavior;

import javafx.collections.ListChangeListener.Change;
import javafx.scene.Node;

/**
 * Container class providing details about the type of change that occured within the view. 
 * <p>
 * Used by <tt>ViewStateListener</tt> to generalize change events.
 * 
 * @author Martin
 *
 */
public class ChangeDetails {

	public enum ChangeType {
		FIELD, LIST;
	}	
	
	private ChangeType changeType;
	
	private Node changedNode;
	
	private Object oldValue;
	
	private Object newValue;
	
	private Change<?> listChange;

	public ChangeType getChangeType() {
		return changeType;
	}

	public void setChangeType(ChangeType changeType) {
		this.changeType = changeType;
	}

	public Node getChangedNode() {
		return changedNode;
	}

	public void setChangedNode(Node changedNode) {
		this.changedNode = changedNode;
	}

	public Object getOldValue() {
		return oldValue;
	}

	public void setOldValue(Object oldValue) {
		this.oldValue = oldValue;
	}

	public Object getNewValue() {
		return newValue;
	}

	public void setNewValue(Object newValue) {
		this.newValue = newValue;
	}

	public Change<?> getListChange() {
		return listChange;
	}

	public void setListChange(Change<?> listChange) {
		this.listChange = listChange;
	}
}
